<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="import :: links"></th:block>
    <link th:href="@{/plugins/markdown/css/editormd.preview.min.css}" rel="stylesheet"/>
</head>
<body>
<section class="container-fulid">
    <div class="col-md-12" id="s">
        <div id="test-editormd-view">
        </div>
    </div>
</section>
<th:block th:include="import :: impJS"></th:block>
<script type="text/javascript" th:src="@{/plugins/markdown/lib/marked.min.js}"></script>
<script type="text/javascript" th:src="@{/plugins/markdown/lib/prettify.min.js}"></script>
<script type="text/javascript" th:src="@{/plugins/markdown/editormd.js}"></script>
<script type="text/javascript" th:inline="javascript">
    var moduleId = [[${moduleId}]];
    $(function () {
        $.ajax({
            url: "/app/module/" + moduleId + ".md",
            type: "text",
            success: function (data) {
                testEditormdView = editormd.markdownToHTML("test-editormd-view", {
                    markdown: data.data,//+ "\r\n" + $("#append-test").text(),
                    htmlDecode: "style,script,iframe",  // you can filter tags decode
                    emoji: false,
                    taskList: false,
                    tex: true,  // 默认不解析
                    flowChart: false,  // 默认不解析
                    sequenceDiagram: false  // 默认不解析
                });
            }
        });
    });

</script>
</body>
</html>